package sys.dao;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import sys.entity.Person;

import java.util.List;


/**
 * @author 秉性哥
 * @createTime 2022/9/20 15:53
 * @description
 */
@Mapper
public interface PersonDao {

    Page<Person> findPage();

    @Insert("insert into person values(null,#{name},#{date})")
    void add(Person person);

    @Delete("delete from person where id=#{id}")
    void del(Integer id);

    @Update("update person set name=#{name},date=#{date} where id=#{id}")
    void edit(Person person);

    @Delete("delete from person where id=#{id}")
    void dels(Integer id);
}
